  /**
   * Generate time : 2016-03-30 9:59:02
   * Version : 1.0.1.V20070717
   */
package com.baosight.innerinterface.domain;

import com.baosight.iplat4j.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;
/**
 * * 
 * table comment : 质检信息 
 */
public class SOSO02 extends DaoEPBase {

	
	private String beanCode = " ";		/* 代码*/
	private String beanName = " ";		/* 名称*/	
	private BigDecimal beanValue = new BigDecimal("0");		/* 值*/
	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		
	
	eiColumn = new EiColumn("beanCode");
	eiColumn.setFieldLength(16);	
	eiColumn.setDescName("代码");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("beanName");
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("名称");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("beanValue");
	eiColumn.setType("N");
	eiColumn.setScaleLength(3);
	eiColumn.setFieldLength(18);
	eiColumn.setDescName("值");
	eiMetadata.addMeta(eiColumn);
	
	}
	/**
	 * the constructor
	 */
	public SOSO02() {
		initMetaData();
	}
	
	public String getBeanCode() {
		return this.beanCode;
	}
	
	public void setBeanCode(String beanCode) {
		this.beanCode = beanCode;
	}
	
	public String getBeanName() {
		return this.beanName;
	}
	
	public void setBeanName(String beanName) {
		this.beanName = beanName;
	}
	
	public BigDecimal getBeanValue() {
		return this.beanValue;
	}
	
	public void setBeanValue(BigDecimal beanValue) {
		this.beanValue = beanValue;
	}
	
	
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setBeanCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("beanCode")), beanCode));
		setBeanName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("beanName")), beanName));
		setBeanValue(NumberUtils.toBigDecimal(StringUtils.toString(map.get("beanValue")), beanValue));
		}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("beanCode",StringUtils.toString(beanCode, eiMetadata.getMeta("beanCode")));	
			map.put("beanName",StringUtils.toString(beanName, eiMetadata.getMeta("beanName")));	
			map.put("beanValue",StringUtils.toString(beanValue, eiMetadata.getMeta("beanValue")));	
			
		return map;
	
	}
}